<?php
function sql_select ($query){
	$sqlUsername='root';
	$sqlPass='gargamel';
	
	try {
		$dbh = new PDO(  'mysql:host=localhost;dbname=myMoney', $sqlUsername, $sqlPass );
		echo "connected to db<br />";
	}
	catch (PDOException $e){
		echo $e->getMessage() ;
	}
	
	
	$sth = $dbh->prepare( $query );
	$sth->execute();
	
	$results = $sth->fetchAll();
	
	return $results;
}


?>